package com.ty.springbootshiro.entity;

import com.baomidou.mybatisplus.annotation.*;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Data;
import org.apache.ibatis.mapping.FetchType;

import java.io.Serial;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * Role
 *
 * @aurhor Administrator  whs
 * @since 2024/8/30
 */
@Data
@TableName("sys_role")
//@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class Role implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    @Serial
    @TableId(type = IdType.AUTO)
    @TableField("role_id")
    private long roleId;

    @TableField("role_name")
    private String roleName;

    @TableField("role_desc")
    private String roleDesc;

    @TableField("role_flag")
    private long roleFlag;



    /**
     * 角色对应的权限列表
     */
    @TableField(exist = false) // 不自动映射
    private Set<Right> rights;



}
